USE [GShield]
GO
/****** Object:  Table [dbo].[LPQuestions]    Script Date: 07/16/2007 10:23:37 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LPQuestions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Question] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 CONSTRAINT [PK_LPQuestions] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[BannedPolicy]    Script Date: 07/16/2007 10:23:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[BannedPolicy](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[GameId] [int] NULL,
	[DateBanned] [datetime] NULL,
 CONSTRAINT [PK_BannedPolicy] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[UsagePolicy]    Script Date: 07/16/2007 10:24:00 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[UsagePolicy](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[StartDate] [datetime] NULL,
	[EndDate] [datetime] NULL,
	[Monday] [int] NULL,
	[MondayType] [int] NULL,
	[Tuesday] [int] NULL,
	[TuesdayType] [int] NULL,
	[Wednesday] [int] NULL,
	[WednesdayType] [int] NULL,
	[Thursday] [int] NULL,
	[ThursdayType] [int] NULL,
	[Friday] [int] NULL,
	[FridayType] [int] NULL,
	[Saturday] [int] NULL,
	[SaturdayType] [int] NULL,
	[Sunday] [int] NULL,
	[SundayType] [int] NULL,
	[Timestamp] [datetime] NULL,
	[Hash] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_UsagePolicy] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[UsageLogs]    Script Date: 07/16/2007 10:23:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[UsageLogs](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Type] [int] NULL,
	[ParentId] [int] NULL,
	[Username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Time] [int] NULL,
	[TimeType] [int] NULL,
	[Message] [varchar](200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Timestamp] [datetime] NULL,
	[Hash] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_Log] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[TimesPolicy]    Script Date: 07/16/2007 10:23:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[TimesPolicy](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[StartDate] [datetime] NULL,
	[EndDate] [datetime] NULL,
	[MondayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[MondayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[TuesdayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[TuesdayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[WednesdayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[WednesdayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ThursdayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ThursdayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FridayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FridayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SaturdayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SaturdayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SundayStart] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SundayEnd] [varchar](5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_TimesPolicy] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[RatingsPolicy]    Script Date: 07/16/2007 10:23:40 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[RatingsPolicy](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AllowEC] [bit] NULL,
	[AllowE] [bit] NULL,
	[Allow10P] [bit] NULL,
	[AllowT] [bit] NULL,
	[AllowM] [bit] NULL,
	[AllowAO] [bit] NULL,
	[AllowRP] [bit] NULL,
	[AllowUnknown] [bit] NULL,
	[Hash] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Timestamp] [datetime] NULL,
 CONSTRAINT [PK_RatingsPolicy] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Exceptions]    Script Date: 07/16/2007 10:23:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Exceptions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[DateAdded] [datetime] NOT NULL CONSTRAINT [DF_Exceptions_DateAdded]  DEFAULT (getdate()),
 CONSTRAINT [PK_Exceptions] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Services]    Script Date: 07/16/2007 10:23:41 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Services](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[URL] [varchar](500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[DateAdded] [datetime] NOT NULL CONSTRAINT [DF_Services_DateAdded]  DEFAULT (getdate()),
 CONSTRAINT [PK_Services] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[DirectoryNameExclusions]    Script Date: 07/16/2007 10:23:25 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[DirectoryNameExclusions](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[DateAdded] [datetime] NOT NULL CONSTRAINT [DF_DirectoryNameExclusions_DateAdded]  DEFAULT (getdate()),
 CONSTRAINT [PK_DirectoryNameExclusions] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Category]    Script Date: 07/16/2007 10:23:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Category](
	[CategoryID] [int] IDENTITY(1,1) NOT NULL,
	[CategoryName] [nvarchar](64) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
 CONSTRAINT [PK_Categories] PRIMARY KEY CLUSTERED 
(
	[CategoryID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Log]    Script Date: 07/16/2007 10:23:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Log](
	[LogID] [int] IDENTITY(1,1) NOT NULL,
	[EventID] [int] NULL,
	[Priority] [int] NOT NULL,
	[Severity] [nvarchar](32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[Title] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[Timestamp] [datetime] NOT NULL,
	[MachineName] [nvarchar](32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[AppDomainName] [nvarchar](512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[ProcessID] [nvarchar](256) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[ProcessName] [nvarchar](512) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
	[ThreadName] [nvarchar](512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Win32ThreadId] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Message] [nvarchar](1500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FormattedMessage] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_LogKey] PRIMARY KEY CLUSTERED 
(
	[LogID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Games]    Script Date: 07/16/2007 10:23:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Games](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Name] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Publisher] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Content] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Rating] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[RatingType] [int] NULL,
	[Platforms] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[FileName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Path] [varchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[InternalName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[ProductName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Company] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[DirectoryName] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[DateAdded] [datetime] NULL,
	[WasChecked] [bit] NULL,
	[DateChecked] [datetime] NULL,
	[NotAGame] [bit] NULL,
	[Hash] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_Games] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[System]    Script Date: 07/16/2007 10:23:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[System](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[AdminPassword] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[LPQ1Id] [int] NULL,
	[LPQ1Ans] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[LPQ2Id] [int] NULL,
	[LPQ2Ans] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[AdminEmail] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SmtpServer] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SmtpRequireLogin] [bit] NULL,
	[SmtpLogin] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[SmtpPassword] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[EnableOtherProcessWatcher] [bit] NULL,
	[RatingsSleepTimer] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[BannedSleepTimer] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[TimeSleepTimer] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[UsageSleepTimer] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Version] [varchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
	[Hash] [varchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
 CONSTRAINT [PK_System] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[CategoryLog]    Script Date: 07/16/2007 10:23:23 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CategoryLog](
	[CategoryLogID] [int] IDENTITY(1,1) NOT NULL,
	[CategoryID] [int] NOT NULL,
	[LogID] [int] NOT NULL,
 CONSTRAINT [PK_CategoryLog] PRIMARY KEY CLUSTERED 
(
	[CategoryLogID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
/****** Object:  StoredProcedure [dbo].[Logs_AddCategory]    Script Date: 07/16/2007 10:23:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Logs_AddCategory]
	-- Add the parameters for the function here
	@CategoryName nvarchar(64),
	@LogID int
AS
BEGIN
	SET NOCOUNT ON;
    DECLARE @CatID INT
	SELECT @CatID = CategoryID FROM Category WHERE CategoryName = @CategoryName
	IF @CatID IS NULL
	BEGIN
		INSERT INTO Category (CategoryName) VALUES(@CategoryName)
		SELECT @CatID = @@IDENTITY
	END

	EXEC InsertCategoryLog @CatID, @LogID 

	RETURN @CatID
END
GO
/****** Object:  StoredProcedure [dbo].[Logs_ClearLogs]    Script Date: 07/16/2007 10:23:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Logs_ClearLogs]
AS
	DELETE FROM CategoryLog
	DELETE FROM [Log]
    DELETE FROM Category
GO
/****** Object:  StoredProcedure [dbo].[InsertCategoryLog]    Script Date: 07/16/2007 10:23:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[InsertCategoryLog]
	@CategoryID INT,
	@LogID INT
AS
BEGIN
	SET NOCOUNT ON;

	DECLARE @CatLogID INT
	SELECT @CatLogID FROM CategoryLog WHERE CategoryID=@CategoryID and LogID = @LogID
	IF @CatLogID IS NULL
	BEGIN
		INSERT INTO CategoryLog (CategoryID, LogID) VALUES(@CategoryID, @LogID)
		RETURN @@IDENTITY
	END
	ELSE RETURN @CatLogID
END
GO
/****** Object:  StoredProcedure [dbo].[Logs_WriteLog]    Script Date: 07/16/2007 10:23:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object:  Stored Procedure dbo.WriteLog    Script Date: 10/1/2004 3:16:36 PM ******/

CREATE PROCEDURE [dbo].[Logs_WriteLog]
(
	@EventID int, 
	@Priority int, 
	@Severity nvarchar(32), 
	@Title nvarchar(256), 
	@Timestamp datetime,
	@MachineName nvarchar(32), 
	@AppDomainName nvarchar(512),
	@ProcessID nvarchar(256),
	@ProcessName nvarchar(512),
	@ThreadName nvarchar(512),
	@Win32ThreadId nvarchar(128),
	@Message nvarchar(1500),
	@FormattedMessage ntext,
	@LogId int OUTPUT
)
AS 

	INSERT INTO [Log] (
		EventID,
		Priority,
		Severity,
		Title,
		[Timestamp],
		MachineName,
		AppDomainName,
		ProcessID,
		ProcessName,
		ThreadName,
		Win32ThreadId,
		Message,
		FormattedMessage
	)
	VALUES (
		@EventID, 
		@Priority, 
		@Severity, 
		@Title, 
		@Timestamp,
		@MachineName, 
		@AppDomainName,
		@ProcessID,
		@ProcessName,
		@ThreadName,
		@Win32ThreadId,
		@Message,
		@FormattedMessage)

	SELECT @LogID = SCOPE_IDENTITY()
	RETURN @LogID
GO
/****** Object:  ForeignKey [FK_CategoryLog_Category]    Script Date: 07/16/2007 10:23:23 ******/
ALTER TABLE [dbo].[CategoryLog]  WITH CHECK ADD  CONSTRAINT [FK_CategoryLog_Category] FOREIGN KEY([CategoryID])
REFERENCES [dbo].[Category] ([CategoryID])
GO
ALTER TABLE [dbo].[CategoryLog] CHECK CONSTRAINT [FK_CategoryLog_Category]
GO
/****** Object:  ForeignKey [FK_CategoryLog_Log]    Script Date: 07/16/2007 10:23:24 ******/
ALTER TABLE [dbo].[CategoryLog]  WITH CHECK ADD  CONSTRAINT [FK_CategoryLog_Log] FOREIGN KEY([LogID])
REFERENCES [dbo].[Log] ([LogID])
GO
ALTER TABLE [dbo].[CategoryLog] CHECK CONSTRAINT [FK_CategoryLog_Log]
GO
